Use entry_get_paddr(l1e) to get the PFN
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 1 Sep 2005 09:07:10 +0000 (09:07 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 1 Sep 2005 09:07:10 +0000 (09:07 +0000)
Otherwise software used bits might get in the way.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
xen/include/asm-x86/shadow_64.h

index b4af0b3d51b44193494f83f6cea08761c4257595..fb555f6a00079f230c4cabcac14974d1dc57d1f6 100644 (file)
@@ -450,7 +450,9 @@ static inline int guest_page_fault(struct vcpu *v,
        /*
         * If it's not external mode, then mfn should be machine physical.
         */
-       mfn = __gpfn_to_mfn(d, (entry_get_value(gle) >> PAGE_SHIFT));
+       mfn = __gpfn_to_mfn(d, (entry_get_paddr(gle) >> PAGE_SHIFT));
+        if (mfn == -1)
+            return 1;
 
         lva = (pgentry_64_t *) phys_to_virt(
            mfn << PAGE_SHIFT);